package com.niodata.dp.core.usermgr.model.result;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonView;
import com.niodata.dp.core.usermgr.model.GroupInfo;
import com.niodata.dp.core.usermgr.model.UserInfo;
import com.niodata.dp.core.usermgr.view.AdminGroupsView;
import com.niodata.dp.core.usermgr.view.GroupMasterView;

@JsonInclude(Include.NON_NULL)
public class GroupResult extends GroupInfo {

  private UserInfo owner;
  private boolean createBucket;
  private boolean createDatabase;
  private boolean submitPackage;
  private boolean submitWorkflow;
  private boolean dashBoard;
  private boolean noteBook;
  private boolean diRes;

  @JsonView(value = {AdminGroupsView.class})
  public UserInfo getOwner() {
    return owner;
  }

  public void setOwner(UserInfo owner) {
    this.owner = owner;
  }


  @JsonView(value = {AdminGroupsView.class, GroupMasterView.class})
  public boolean isCreateBucket() {
    return createBucket;
  }

  public void setCreateBucket(boolean createBucket) {
    this.createBucket = createBucket;
  }

  @JsonView(value = {AdminGroupsView.class, GroupMasterView.class})
  public boolean isCreateDatabase() {
    return createDatabase;
  }

  public void setCreateDatabase(boolean createDatabase) {
    this.createDatabase = createDatabase;
  }

  @JsonView(value = {AdminGroupsView.class, GroupMasterView.class})
  public boolean isSubmitPackage() {
    return submitPackage;
  }

  public void setSubmitPackage(boolean submitPackage) {
    this.submitPackage = submitPackage;
  }

  public boolean isSubmitWorkflow() {
    return submitWorkflow;
  }

  @JsonView(value = {AdminGroupsView.class, GroupMasterView.class})
  public void setSubmitWorkflow(boolean submitWorkflow) {
    this.submitWorkflow = submitWorkflow;
  }

  public boolean isDashBoard() {
    return dashBoard;
  }

  @JsonView(value = {AdminGroupsView.class, GroupMasterView.class})
  public void setDashBoard(boolean dashBoard) {
    this.dashBoard = dashBoard;
  }

  public boolean isNoteBook() {
    return noteBook;
  }

  @JsonView(value = {AdminGroupsView.class, GroupMasterView.class})
  public void setNoteBook(boolean noteBook) {
    this.noteBook = noteBook;
  }

  public boolean isDiRes() {
    return diRes;
  }

  @JsonView(value = {AdminGroupsView.class, GroupMasterView.class})
  public void setDiRes(boolean diRes) {
    this.diRes = diRes;
  }
}
